package com.mc.lp.database.entity;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/*
 * @author aphanda
 * @date Sep 21, 2014
 * @time 12:58:51 AM
 */


@Table
@Entity(name="EXTRA_ACADEMIC_RECORD")
public class ExtraAcademicRecordEntity extends MicroCampusBaseEntity {

	
	private static final long serialVersionUID = 1L;

	@Column(name = "STUDENT_ENTITY_ID")
	private Long studentEntity;
	
	@Column(name="CERTIFICATION_ID")
	private Long certificationId;

	@Column(name = "DATED")
	private Date dated;
	
	@Column(name = "SCHOOL_RANK")
	private Long schoolRank;
	
	@Column(name = "STATE_RANK")
	private Long stateRank;
	
	@Column(name = "GRADE")
	private int gradeId;

	@Column(name = "AI_RANK")
	private Long allIndiaRank;

	@Column(name = "CERTIFICATE_ATTACHMENT_ID")
	private Long certificateAttachmentId;

	@Column(name="ATTRIBUTE_WEIGHTAGE")
	private int attributeWeightage;
	
	@Column(name = "REMARKS")
	private String remark;
	
	public int getAttributeWeightage() {
		return attributeWeightage;
	}

	public void setAttributeWeightage(int attributeWeightage) {
		this.attributeWeightage = attributeWeightage;
	}
	
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public Long getStudentEntity() {
		return studentEntity;
	}

	public void setStudentEntity(Long studentEntity) {
		this.studentEntity = studentEntity;
	}

	public Date getDated() {
		return dated;
	}

	public void setDated(Date dated) {
		this.dated = dated;
	}

	public Long getSchoolRank() {
		return schoolRank;
	}

	public void setSchoolRank(Long schoolRank) {
		this.schoolRank = schoolRank;
	}

	public Long getStateRank() {
		return stateRank;
	}

	public void setStateRank(Long stateRank) {
		this.stateRank = stateRank;
	}

	public Long getAllIndiaRank() {
		return allIndiaRank;
	}

	public void setAllIndiaRank(Long allIndiaRank) {
		this.allIndiaRank = allIndiaRank;
	}

	public Long getCertificateAttachmentId() {
		return certificateAttachmentId;
	}

	public void setCertificateAttachmentId(Long certificateAttachmentId) {
		this.certificateAttachmentId = certificateAttachmentId;
	}

	public Long getCertificationId() {
		return certificationId;
	}

	public void setCertificationId(Long certificationId) {
		this.certificationId = certificationId;
	}

	public int getGradeId() {
		return gradeId;
	}

	public void setGradeId(int gradeId) {
		this.gradeId = gradeId;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + ((allIndiaRank == null) ? 0 : allIndiaRank.hashCode());
		result = prime * result
				+ ((certificateAttachmentId == null) ? 0 : certificateAttachmentId.hashCode());
		result = prime * result + ((certificationId == null) ? 0 : certificationId.hashCode());
		result = prime * result + ((dated == null) ? 0 : dated.hashCode());
		result = prime * result + gradeId;
		result = prime * result + ((schoolRank == null) ? 0 : schoolRank.hashCode());
		result = prime * result + ((stateRank == null) ? 0 : stateRank.hashCode());
		result = prime * result + ((studentEntity == null) ? 0 : studentEntity.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		ExtraAcademicRecordEntity other = (ExtraAcademicRecordEntity) obj;
		if (allIndiaRank == null) {
			if (other.allIndiaRank != null)
				return false;
		} else if (!allIndiaRank.equals(other.allIndiaRank))
			return false;
		if (certificateAttachmentId == null) {
			if (other.certificateAttachmentId != null)
				return false;
		} else if (!certificateAttachmentId.equals(other.certificateAttachmentId))
			return false;
		if (certificationId == null) {
			if (other.certificationId != null)
				return false;
		} else if (!certificationId.equals(other.certificationId))
			return false;
		if (dated == null) {
			if (other.dated != null)
				return false;
		} else if (!dated.equals(other.dated))
			return false;
		if (gradeId != other.gradeId)
			return false;
		if (schoolRank == null) {
			if (other.schoolRank != null)
				return false;
		} else if (!schoolRank.equals(other.schoolRank))
			return false;
		if (stateRank == null) {
			if (other.stateRank != null)
				return false;
		} else if (!stateRank.equals(other.stateRank))
			return false;
		if (studentEntity == null) {
			if (other.studentEntity != null)
				return false;
		} else if (!studentEntity.equals(other.studentEntity))
			return false;
		return true;
	}
	
}
